home *** CD-ROM | disk | FTP | other *** search
/ Skunkware 5 / Skunkware 5.iso / lib / ObjectTcl-1.1 / otcl / otcl.tcl < prev    next >
Text File  |  1995-06-29  |  703b  |  25 lines

  1. if {[catch {rename unknown otcl_old_unknown}] != 0} {
  2.    set otcl_old_unknown 0
  3. } else {
  4.    set otcl_old_unknown 1
  5. }
  6.  
  7. proc unknown {args} {
  8.  
  9.    global otcl_old_unknown
  10.  
  11.    if {[catch {otcl remoteObject [lindex $args 0]}] == 0} {
  12.       # The command addresses a remote object. A proxy object
  13.       # will have been created to takes it's place in the local process
  14.       return [uplevel 1 $args]
  15.    } else {
  16.       # The command doesn't address a remote object or this otcl
  17.       # isn't build for distributed processing
  18.       if {$otcl_old_unknown} {
  19.          return [uplevel 1 otcl_old_unknown $args]
  20.       } else {
  21.           return -code error "invalid command name \"[lindex $args 0]\""
  22.       }
  23.    }
  24. }
  25.